package com.rongmei.jdsync.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;


/**
 * 商品详情数据传输对象
 *
 * @author dongjun
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(description = "商品详情数据")
public class GoodsDetailDto {
    @JsonProperty("brand_id")
    @Schema(description = "品牌ID")
    private Long brandId;

    @JsonProperty("brand_logo")
    @Schema(description = "品牌logo")
    private String brandLogo;

    @JsonProperty("brand_name")
    @Schema(description = "品牌名称")
    private String brandName;

    @JsonProperty("category_id")
    @Schema(description = "类目ID")
    private Long categoryId;

    @JsonProperty("cost_price")
    @Schema(description = "成本价")
    private BigDecimal costPrice;

    @JsonProperty("delivery_type")
    @Schema(description = "配送类型")
    private Integer deliveryType;

    @Schema(description = "距离")
    private Object distance;

    @JsonProperty("distance_formatted")
    @Schema(description = "格式化后的距离")
    private String distanceFormatted;

//    @JsonProperty("goods_attr_format")
//    @Schema(description = "商品属性")
//    private List<GoodsAttrFormatDto> goodsAttrFormat;

//    @JsonProperty("goods_content")
//    @Schema(description = "商品详情富文本")
//    private String goodsContent;

    @JsonProperty("goods_id")
    @Schema(description = "商品ID")
    private Long goodsId;

    @JsonProperty("goods_image")
    @Schema(description = "商品图片")
    private String goodsImage;

//    @JsonProperty("goods_images")
//    @Schema(description = "商品图片列表")
//    private List<String> goodsImages;

    @JsonProperty("goods_name")
    @Schema(description = "商品名称")
    private String goodsName;

    @JsonProperty("goods_service_ids")
    @Schema(description = "商品服务ID")
    private String goodsServiceIds;

//    @JsonProperty("goods_services")
//    @Schema(description = "商品服务")
//    private List<String> goodsServices;

    @JsonProperty("goods_source")
    @Schema(description = "商品来源")
    private Integer goodsSource;

    @JsonProperty("goods_state")
    @Schema(description = "商品状态：1上架0下架")
    private Integer goodsState;

    @JsonProperty("goods_stock")
    @Schema(description = "商品库存")
    private Integer goodsStock;

    @JsonProperty("goods_type")
    @Schema(description = "商品类型")
    private Integer goodsType;

    @Schema(description = "商品简介")
    private String introduction;

    @JsonProperty("is_collect")
    @Schema(description = "是否收藏")
    private Integer isCollect;

    @JsonProperty("is_makeups_goods")
    @Schema(description = "是否组合商品")
    private Integer isMakeupsGoods;

    @JsonProperty("is_sku")
    @Schema(description = "是否有SKU")
    private Integer isSku;

    @JsonProperty("is_vip")
    @Schema(description = "是否VIP商品")
    private Integer isVip;

    @Schema(description = "纬度")
    private String latitude;

    @Schema(description = "经度")
    private String longitude;

    @JsonProperty("main_image")
    @Schema(description = "主图")
    private String mainImage;

    @JsonProperty("makeups_company_price")
    @Schema(description = "组合公司价")
    private String makeupsCompanyPrice;

    @JsonProperty("makeups_pioneer_price")
    @Schema(description = "组合先锋价")
    private String makeupsPioneerPrice;

    @JsonProperty("market_price")
    @Schema(description = "市场价")
    private String marketPrice;

    @Schema(description = "售价")
    private String price;

    @JsonProperty("profit_ratio")
    @Schema(description = "利润率")
    private String profitRatio;

    @JsonProperty("promotion_addon")
    @Schema(description = "促销附加信息")
    private String promotionAddon;

//    @JsonProperty("promotion_list")
//    @Schema(description = "促销列表")
//    private List<String> promotionList;

    @JsonProperty("sale_num")
    @Schema(description = "销量")
    private Integer saleNum;

    @JsonProperty("service_phone")
    @Schema(description = "服务电话")
    private String servicePhone;

    @JsonProperty("site_id")
    @Schema(description = "站点ID")
    private Integer siteId;

    @JsonProperty("sku_data")
    @Schema(description = "SKU数据")
    private List<SkuDataDto> skuData;

    @JsonProperty("sku_id")
    @Schema(description = "SKU ID")
    private Long skuId;

//    @JsonProperty("sku_list")
//    @Schema(description = "SKU规格列表")
//    private List<SkuSpecDto> skuList;

    @Schema(description = "来源")
    private Integer source;

    @JsonProperty("start_sale_time")
    @Schema(description = "开始销售时间")
    private Long startSaleTime;

    @Schema(description = "单位")
    private String unit;

    @JsonProperty("video_url")
    @Schema(description = "视频URL")
    private String videoUrl;

    @JsonProperty("vip_price")
    @Schema(description = "VIP价格")
    private BigDecimal vipPrice;

//    // 处理额外的属性
//    private Map<String, Object> additionalProperties = new HashMap<>();
//
//    @JsonAnyGetter
//    public Map<String, Object> getAdditionalProperties() {
//        return additionalProperties;
//    }
//
//    @JsonAnySetter
//    public void setAdditionalProperty(String name, Object value) {
//        additionalProperties.put(name, value);
//    }
}
